/*----------------------------------------------------------------------------------------
*
*  Copyright 2019, Gao Hai Hui, <fromzeropoint@126.com>.  All rights reserved.
*  https://gitee.com/helloworldghh/xoskit.git
*  Use of this source code is governed by a MIT license
*  that can be found in the License file.
*
----------------------------------------------------------------------------------------*/
#ifndef __0F807CB2_B675_4dc1_97D9_3887E5DEB4B9__
#define __0F807CB2_B675_4dc1_97D9_3887E5DEB4B9__

#include "../macro/head.h"
#include "../release/head.h"

/////////////////////////////////////////////////////////////////////////////////////////
// 
namespace xos
{
    // 
    // event interface
    // 
    class i_event : public i_release
    {
    public:
        enum enumWaitRet
        {
            EVENT_WAIT_OBJECT_0,
            EVENT_WAIT_TIMEOUT,
            EVENT_WAIT_FAILED,
            EVENT_WAIT_INFINITE = 0xffffffff
        };

    protected:
        virtual ~i_event(){}

    public:
        // 
        // wait for event ...
        // 
        virtual unsigned long wait( unsigned long ulMilliseconds ) = 0;
        // 
        // set event
        // 
        virtual int set_event() = 0;
    };
}

#endif // __0F807CB2_B675_4dc1_97D9_3887E5DEB4B9__
